<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/9/18 0018
  Time: 10:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" pageEncoding="utf-8" %>
<%@ include file="/include/taglibs.jsp" %>
<script src="${path}/static/taoshunda/business/activity.js"></script>
<link href="${path}/static/css/public/public.css" rel="stylesheet" type="text/css">

<button type="button" class="btn btn-default-button" id="addActivity" style="background-color: #3c8dbc;color: snow;float: left">
    添加优惠活动
</button>

<div class="input-group col-xs-2" style="float: left;margin-left: 3px;margin-bottom: 3px">
    <input type="text" id="busName" class="form-control entry" placeholder="输入商家名称"/>
</div>
<div style="float: left;margin-left: 10px;margin-bottom: 3px">
    <button type="button" class="btn btn-default" id="btnsearch" onclick="queryActivity()" style="float: left;width: 150%">
        <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
        查询
    </button>
</div>
<table id="table"
       data-toggle="table"
       data-url="${path}/web/business/queryBusinessActivity"
       data-toolbar="#toolbar"
       data-side-pagination="server"
       data-pagination="true"
       data-page-list="[5, 10, 20, 50, 100, 200]"
>
    <thead>
    <tr>
        <th data-field="id" data-visible="false">编号</th>
        <th data-field="account">注册账号</th>
        <th data-field="Bname">商家名称</th>
        <th data-field="name">活动名称</th>
        <th data-field="created">创建日期</th>
        <th data-formatter="operateFormatter" data-events="operateEventes">操作</th>
    </tr>
    </thead>
</table>

<div id="updateBusinessActivity-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="45%">
    <div class="box-header">
        <h3 class="box-title">修改商家</h3>
    </div>
    <div class="box box-info">
        <div class="box-body">
            <form role="form" method="post" id="updateBusinessActivityFrom">
                <input id="updateId" name="id" type="hidden">

                <div class="form-group">
                    <label>活动名称:</label>
                    <input type="text" class="form-control " name="name" required="required" style="width: 50%"
                           id="name">
                </div>

            </form>
            <div class="box-footer">
                <button class="btn btn-info" data-event="submit-updateBusinessActivity">确定</button>
                &nbsp;
                <button class="btn btn-danger close-model">关闭</button>
            </div>
        </div>
    </div>
</div>

<div id="addBusinessActivity-div" class="slidingmenu box-model box box-info" style="z-index:0;" model-width="45%">
    <div class="box-header">
        <h3 class="box-title">添加商家</h3>
    </div>
    <div class="box box-info">
        <div class="box-body">
            <form role="form" method="post" id="addBusinessActivityFrom">
                <input type="hidden" id="busids" name="businessId">

                <div class="form-group">
                    <label>省份:</label>
                    <select class="form-control" id="getCity" onchange="queryJuniorCity()">
                        <option value="0">--请选择--</option>
                    </select>
                </div>

                <div class="form-group" style="display: none" id="cityId">
                    <label>城市:</label>
                    <select class="form-control" id="getJuniorCity" onchange="queryBusinessCity()" >
                        <option value="0">--请选择--</option>
                    </select>
                </div>

                <div class="form-group" style="display: none" id="busId">
                    <label>商家:</label>
                    <select class="form-control" id="getBusiness" >
                        <option value="0">--请选择--</option>
                    </select>
                </div>

                <div class="form-group">
                    <label>活动名称:</label>
                    <input type="text" class="form-control " name="name" required="required" style="width: 50%"
                           id="names">
                </div>
            </form>
            <div class="box-footer">
                <button class="btn btn-info" data-event="submit-addBusinessActivity">确定</button>
                &nbsp;
                <button class="btn btn-danger close-model">关闭</button>
            </div>
        </div>
    </div>
</div>
